package com.lmxdawn.api.common.api;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

/**
 * 系统常量
 * <p>
 *
 * @author jy
 * @since 2023-11-23 09:07
 */
public interface Constants {
    
    /**
     * 日期格式化
     */
    String DATE_MM_SS = "yyyy-MM-dd HH:mm:ss";
    String DATE_MM = "yyyy-MM-dd HH:mm";
    String GMT8 = "GMT+8";
    
    /**
     * 全局请求参数体
     */
    String TID_KEY = "com.leelen.cloud.tid";
    String TS_KEY = "com.leelen.cloud.ts";
    String CHANNEL_KEY = "com.leelen.cloud.channel";
    
    /**
     * 默认租户号
     */
    Long DEFAULT_TENANT_ID = 0L;
    /**
     * 默认部门ID
     */
    Long DEFAULT_DEPT_ID = 0L;
    /**
     * 默认空用户ID
     */
    Long DEFAULT_EMPTY_USER_ID = 0L;
    
    /**
     * SQL 限制一条
     */
    String LIMIT_ONE = "LIMIT 1";
    
    /**
     * 常用整数
     */
    Integer ZERO = 0;
    Integer ONE = 1;
    Integer TWO = 2;
    Integer THREE = 3;
    Integer FOUR = 4;
    Integer FIVE = 5;
    Integer SIX = 6;
    Integer SEVEN = 7;
    Integer EIGHT = 8;
    Integer NINE = 9;
    Integer TEN = 10;
    Integer INT_HUNDRED = 100;
    Integer ONE_THOUSAND = 1000;
    Integer TEN_THOUSANS = 10000;

    /**
     * 常用金额
     */
    BigDecimal HUNDRED = new BigDecimal("100");
    
    /**
     * 空Map
     */
    Map<Object, Object> EMPTY_MAP = new HashMap<>();
    
    
    /**
     * 常用char
     */
    public static final char ONE_CHAR = '1';
    
    public static final char ZERO_CHAR = '0';

    Integer TRUE = 1;

    Integer FALSE = 0;

    String YES = "1";

    String NOT = "0";
    String REQUEST_HEADERS_AUTHORIZATION = "Authorization";

    //持续告警时间等级
    public static final class TimeRange{
        public static final int EVERYDAY = 0;//每天
        public static final int A_CERTAIN_PERIOD_OF_TIME = 1;//某一时间段
    }

    interface MessageType {

        /**
         * 文本消息
         */
        String MESSAGE_TEXT = "text";

        /**
         * 消息事件
         */
        String MESSAGE_EVENT = "event";

        /**
         * 订阅
         */
        String MESSAGE_SUBSCRIBE = "subscribe";

        /**
         * 扫码
         */
        String MESSAGE_SCAN = "SCAN";
        /**
         * 扫码
         */
        String CLICK = "CLICK";
    }

}
